#ifndef VECDIRFILES_H
#define VECDIRFILES_H

#include <windows.h>
#include <string>
#include <vector>

////////////////////////////////////////////////////////////
//**********************************************************
//  MUST INSTALL YOUR PROGRAMS AS CLOSE TO THE ROOT DRIVE  
//	AS POSSIBLE. LIKE PROGRAM FILES. OTHER WISE DRIRECTORY
//	NAMES MAY GET TO LONG TO PROCCESS, RESULTING IN ERRORS!
//	THERE IS ONLY 260 CHARACTERS ALLOWED FOR DIRECTORY NAMES
//**********************************************************
////////////////////////////////////////////////////////////

class vecDirFiles
{
public:
	vecDirFiles( void ){}
	vecDirFiles( std::string directory );
	~vecDirFiles();
	std::string getCWSubDir( std::string subDir );
	std::string getCWD();
	void setDir( std::string directory );
	std::vector<std::string> getFileNames(){ return sVec; }
	std::string getDirectoryName() { return directory; }
private:
	LPTSTR convertStringToLPTSTR( std::string& str );
	std::string convertLPTSTRToString( LPTSTR str );
	LPTSTR catDirEnd( LPTSTR str );
	void fillVectorWithFiles();
	std::vector<std::string> sVec;
	WIN32_FIND_DATA fileInfo;
	HANDLE hFind;
	LPTSTR Dir;
	std::string directory;
};

#endif //VECDIRFILES_H